﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace LiZhengwei.Controllers
{
    public class HomeController : Controller
    {
        /// <summary>
        /// 首页
        /// </summary>
        /// <returns></returns>
        // GET: Home
        public ActionResult Index()
        {
            return View();
        }
        public ActionResult SouYe() {
            return View();
        }
        /// <summary>
        /// 登录页
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public ActionResult Login()
        {
            return View();
        }
        [HttpPost]
        public ActionResult Login(string username, string password) {
            try {
                if (username == null)
                {
                    return Json(new { erro = false, msg = "用户名为空" });
                }
                else {                   
                    return Json(new { erro = true, msg = username });
                }               
            }
            catch (Exception ex) {
                return Json(new { erro = false, msg = "登录失败" });
            }
        }
    }
}